package com.example.huadi1.controller;

import com.example.huadi1.service.SupplierService;
import com.example.huadi1.utils.AjaxResult;
import com.example.huadi1.utils.Request.PageRequest;
import com.example.huadi1.utils.Request.SinglePageRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/supplier")
@Slf4j
public class SupplierController {
    @Autowired
    SupplierService supplierService;
    @PostMapping("/queryAll")
    public AjaxResult queryAllSupplier(@RequestBody SinglePageRequest singlePageRequest){
        return supplierService.queryAllSupplier(singlePageRequest);
    }
}
